package com.battery.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import com.battery.common.core.domain.BaseEntity;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 活动对象 ws_event
 *
 * @author battery
 * @date 2021-01-26
 */
@Table(name = "ws_event")
public class Event {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 活动名称
     */
    @Excel(name = "活动名称")
    private String eventName;

    private int tp;

    public int getTp() {
        return tp;
    }

    public void setTp(int tp) {
        this.tp = tp;
    }

    /**
     * 活动标题图片
     */
    @Excel(name = "活动标题图片")
    private String titleImg;

    /**
     * 活动开启时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动开启时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 活动结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Integer state;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 更新时间
     */
    private Date updatedTime;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 网页内容
     */
    private String webContent;

    /**
     * 网页URL
     */
    private String webUrl;

    /**
     *
     */
    private Integer isDelete;


    /**
     * 激活条件（累计500元订单金额）
     */
    private BigDecimal activateCondition;

    /**
     * 活动分润
     */
    @Excel(name = "活动分润")
    private BigDecimal eventShare;


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getEventName() {
        return eventName;
    }

    public void setTitleImg(String titleImg) {
        this.titleImg = titleImg;
    }

    public String getTitleImg() {
        return titleImg;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getState() {
        return state;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setWebContent(String webContent) {
        this.webContent = webContent;
    }

    public String getWebContent() {
        return webContent;
    }

    public void setWebUrl(String webUrl) {
        this.webUrl = webUrl;
    }

    public String getWebUrl() {
        return webUrl;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }


    public BigDecimal getActivateCondition() {
        return activateCondition;
    }

    public void setActivateCondition(BigDecimal activateCondition) {
        this.activateCondition = activateCondition;
    }

    public BigDecimal getEventShare() {
        return eventShare;
    }

    public void setEventShare(BigDecimal eventShare) {
        this.eventShare = eventShare;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("eventName", getEventName())
                .append("titleImg", getTitleImg())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("state", getState())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .append("remarks", getRemarks())
                .append("webContent", getWebContent())
                .append("webUrl", getWebUrl())
                .append("isDelete", getIsDelete())
                .toString();
    }
}
